<?php
// Define que o arquivo terá a codificação de saída no formato CSS
header("Content-type: text/css");
require_once("../configs.php");
require_once(PASTA_SMARTY . "Funcoes.class.php");
require_once(PASTA_CONEXAO . "Conexao.class.php");

$conexao = new Conexao();
$con = $conexao->getConexao();
$sql = "SELECT * FROM tb_config_layout WHERE id_layout=1";
$dados = $con->GetRow($sql);

$cor_fundo_portal = $dados["cor_fundo_portal"];
$cor_fundo_conteudo = $dados["cor_fundo_conteudo"];
$cor_fundo_cabecalho = $dados["cor_fundo_cabecalho"];
$cor_fundo_rodape = $dados["cor_fundo_rodape"];
$cor_menu = $dados["cor_menu"];
$cor_botao_geral = $dados["cor_botao_geral"];
$cor_botao_var_1 = $dados["cor_botao_var_1"];
$cor_botao_borda = $dados["cor_botao_borda"];
$cor_botao_start = $dados["cor_botao_start"];
$cor_botao_end = $dados["cor_botao_end"];
$cor_botao_hove = $dados["cor_botao_hove"];

$cor_menu_fundo = $dados["cor_menu_fundo"];
$cor_menu_var_1 = $dados["cor_menu_var_1"];
$cor_menu_var_2 = $dados["cor_menu_var_2"];
$cor_menu_borda = $dados["cor_menu_borda"];
$cor_menu_texto = $dados["cor_menu_texto"];
$cor_menu_texto_hove = $dados["cor_menu_texto_hove"];
$cor_menu_selecionado = $dados["cor_menu_selecionado"];
$cor_menu_selecionado_texto = $dados["cor_menu_selecionado_texto"];

$cor_texto_marcador = $dados["cor_texto_marcador"];
$cor_fundo_marcador = $dados["cor_fundo_marcador"];

$largura_cabecalho = $dados["largura_cabecalho"];
$altura_cabecalho = $dados["altura_cabecalho"];

$cor_h1 = $dados["cor_h1"];
$cor_h2 = $dados["cor_h2"];
$cor_h3 = $dados["cor_h3"];
$cor_h4 = $dados["cor_h4"];
$cor_h5 = $dados["cor_h5"];
$cor_paragrafo = $dados["cor_paragrafo"];
$cor_link_mapa = $dados["cor_link_mapa"];
$cor_label = $dados["cor_label"];

$cor_texto = '#003333';
$imagem_link = '../img/link.jpg'
?>

body {
background: <?php echo $cor_fundo_portal; ?>!important;
}

p.texto {
font-family: Verdana, Arial, serif;
color: <?php echo $cor_texto; ?>;
font-size: 12px;
}

a.especial {
text-decoration: none;
background: white url('<?php echo $imagem_link; ?>') 0px 0px no-repeat;
}

.btn-personalizado.active{
color: rgba(255, 255, 255, 0.75);
}
.btn-personalizado {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: <?php echo $cor_botao_geral; ?>;
background-image: -moz-linear-gradient(top, <?php echo $cor_botao_var_1; ?>, <?php echo $cor_botao_geral; ?>);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(<?php echo $cor_botao_var_1; ?>), to(<?php echo $cor_botao_geral; ?>));
background-image: -webkit-linear-gradient(top, <?php echo $cor_botao_var_1; ?>, <?php echo $cor_botao_geral; ?>);
background-image: -o-linear-gradient(top, <?php echo $cor_botao_var_1; ?>, <?php echo $cor_botao_geral; ?>);
background-image: linear-gradient(to bottom, <?php echo $cor_botao_var_1; ?>, <?php echo $cor_botao_geral; ?>);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='<?php echo $cor_botao_start; ?>', endColorstr='<?php echo $cor_botao_end; ?>', GradientType=0);
border-color: <?php echo $cor_botao_geral; ?> <?php echo $cor_botao_geral; ?> <?php echo $cor_botao_borda; ?>;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: <?php echo $cor_botao_geral; ?>;
/* Darken IE7 buttons by default so they stand out more given they won't have borders */

filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.btn-personalizado:hover,
.btn-personalizado:focus,
.btn-personalizado:active,
.btn-personalizado.active,
.btn-personalizado.disabled,
.btn-personalizado[disabled] {
color: #ffffff;
background-color: <?php echo $cor_botao_geral; ?>;
*background-color: <?php echo $cor_botao_hove; ?>;
}
.btn-personalizado:active,
.btn-personalizado.active {
background-color: <?php echo $cor_botao_hove; ?> \9;
}

.navbar-inverse .navbar-inner {
background-color: <?php echo $cor_menu_fundo; ?> !important;
background: <?php echo $cor_menu_fundo; ?> !important;
background-image: linear-gradient(to bottom, <?php echo $cor_menu_var_1; ?>, <?php echo $cor_menu_var_2; ?>)!important;
filter: progid: DXImageTransform.Microsoft.gradient (startColorstr = <?php echo $cor_menu_var_1; ?>, endColorstr = <?php echo $cor_menu_var_2; ?>); / * para IE * /
background: -webkit-gradient(linear, left top, left bottom, from(<?php echo $cor_menu_var_1; ?>), to(<?php echo $cor_menu_var_2; ?>)); /* for webkit browsers */
background: -moz-linear-gradient(top,  <?php echo $cor_menu_var_1; ?>,  <?php echo $cor_menu_var_2; ?>); /* for firefox 3.6+ */
background-repeat: repeat-x;
border-color: <?php echo $cor_menu_borda; ?>;
}

.navbar .divider-vertical2 {
height: 40px;
box-shadow: 1px 0px 0px rgba(255, 255, 195, 0.23) !important;
}
.navbar .nav > li > a:hover {
color: <?php echo $cor_menu_texto_hove; ?> !important;
font-weight: bold !important;
font-size: 14px;
}
.MSIE8 .navbar .nav > li > a:hover {
color: <?php echo $cor_menu_texto_hove; ?> !important;
font-weight: bold !important;
font-size: 14px;
}
.navbar-inverse .brand, .navbar-inverse .nav > li > a {
color: <?php echo $cor_menu_texto; ?>;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
font-weight: bold;
}

.navbar-inverse .nav .active > a, .navbar-inverse .nav .active > a:hover, .navbar-inverse .nav .active > a:focus {
background-color: <?php echo $cor_menu_selecionado; ?>;
color: <?php echo $cor_menu_selecionado_texto; ?>;
}
.rodape{
background-color:<?php echo $cor_fundo_rodape; ?>!important;
}
.conteudo{
background-color:<?php echo $cor_fundo_conteudo; ?>!important;
}
.cabecalho{
background-color:<?php echo $cor_fundo_cabecalho; ?>!important;
}
.marcador{
color: <?php echo $cor_texto_marcador; ?>!important;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color:<?php echo $cor_fundo_marcador; ?>!important;
padding:10px;
border: 1px solid #DDDDDD !important;
border-radius: 6px 6px 6px 6px !important;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075) !important;
}
.progress-personalizado .bar,
.progress .bar-success {
background-color: <?php echo $cor_botao_geral; ?>;
background-image: -moz-linear-gradient(top, <?php echo $cor_botao_var_1; ?>, <?php echo $cor_botao_geral; ?>);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(<?php echo $cor_botao_var_1; ?>), to(<?php echo $cor_botao_geral; ?>));
background-image: -webkit-linear-gradient(top, <?php echo $cor_botao_var_1; ?>, <?php echo $cor_botao_geral; ?>);
background-image: -o-linear-gradient(top, <?php echo $cor_botao_var_1; ?>, <?php echo $cor_botao_geral; ?>);
background-image: linear-gradient(to bottom, <?php echo $cor_botao_var_1; ?>, <?php echo $cor_botao_geral; ?>);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0);
}
.progress-personalizado.progress-striped .bar,
.progress-striped .bar-success {
background-color: <?php echo $cor_botao_geral; ?>;
background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
a.thumbnail:hover {
border-color: <?php echo $cor_botao_geral; ?>;
-webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
-moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
}
a{
color: <?php echo $cor_botao_geral; ?>;
}
.cabecalho{
/*width: <?php echo $largura_cabecalho; ?> !important;*/
height: <?php echo $altura_cabecalho; ?> !important;
max-height:<?php echo $altura_cabecalho; ?> !important;
}

h1{
color: <?php echo $cor_h1; ?>;
}
h2{
color: <?php echo $cor_h2; ?>;
}
h3{
color: <?php echo $cor_h3; ?>;
}
h4{
color: <?php echo $cor_h4; ?>;
}
h5{
color: <?php echo $cor_h5; ?>;
}
p{
color: <?php echo $cor_paragrafo; ?>;
}
label{
color: <?php echo $cor_label; ?>!important;
}
.linkMapa{
color: <?php echo $cor_link_mapa; ?>;
}
.corPadrao{
color: <?php echo $cor_botao_geral; ?> !important;
}
.bordaRight3pxPadrao{
border-right: solid 3px <?php echo $cor_botao_geral; ?>;
}
.migalha li{
    color: <?php echo $cor_fundo_conteudo ?> !important;
}


.nav-list > .active > a, .nav-list > .active > a:hover {
background-color: <?php echo $cor_botao_geral; ?>;
color: #FFFFFF;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
}
.table thead th {
background-color:  <?php echo $cor_botao_geral; ?> !important;
color: #FFFFFF !important;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
}
<?php $cor_botao_geral_rgb = Funcoes::parseHexToRGBStr($cor_botao_geral); ?>
textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
input[type="week"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="color"]:focus,
.uneditable-input:focus {
border-color: rgba( <?php echo $cor_botao_geral_rgb; ?>, 0.8);
outline: 0;
outline: thin dotted \9;
/* IE6-9 */

-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
}
